package com.lingxin.gps.wap.command;

import com.lingxin.gps.sdk.GpsDeviceApi;
import com.pisces.core.Assert;
import com.pisces.core.BaseCommand;

/**
 *
 */
public class CUserInfoSave extends BaseCommand {

	private String nickName;
	private String mobile;

	private Long uid;
	private String token;

	@Override
	public void init() throws Exception {
		nickName = getPara("nickName");
		Assert.notBlank(nickName, "姓名不能为空");

		mobile = getPara("mobile");
		Assert.notBlank(mobile, "手机不能为空");

		uid = context.getAttr("uid");
		token = context.getAttr("token");
	}

	@Override
	public void doCommand() throws Exception {
		GpsDeviceApi.userSaveInfo(uid, token, nickName, mobile);
	}

}
